import VueDraggable from 'vuedraggable'
import ImagePicker from './image-picker'
import WidgetView from './edit/widget-view'
import Icons from './icon'

export default {
    install(Vue) {
        Vue.component('draggable', VueDraggable)
        Vue.component('WidgetView', WidgetView)
        Vue.component('ImagePicker', ImagePicker)

        // 统一全局注册自定义图标，icon-开头
        for (let iconName in Icons) {
            Vue.component(iconName, Icons[iconName])
        }
    }
}